// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 获取 组织树 POST */
export async function treeOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminOrganizationData.Organization[]>>(
    '/admin/organization/tree',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 选择 组织 POST */
export async function selectOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<AdminOrganizationData.Organization>>(
    '/admin/organization/select',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 保存 组织 POST */
export async function saveOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<null>>('/admin/organization/save', {
    method: 'POST',
    data: options || {},
  });
}

/** 编辑 组织 POST */
export async function updateOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<null>>('/admin/organization/update', {
    method: 'POST',
    data: options || {},
  });
}

/** 删除 组织 POST */
export async function deleteOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<null>>('/admin/organization/delete', {
    method: 'POST',
    data: options || {},
  });
}
